package com.tutor.lzm.app;

import android.os.Environment;

import com.alibaba.sdk.android.oss.common.utils.DateUtil;
import com.tutor.syslib.pulltorefresh.PullToRefreshBase;
import com.tutor.syslib.util.DateTimeHelper;

import java.util.Date;

/**
 * Created by zzgpc on 2017-9-24.
 */

public class Constant {


    /* request code */
    public static final int REQUEST_CODE_BASE = 100;
    public static final int REQUEST_PICTURE = REQUEST_CODE_BASE + 2;
    public static final int RESULT_REQUEST_CODE = 2;
    public static final String OSS_filename = Environment.getExternalStorageDirectory() + "/HealthChat/";


    public static final int TASK_NONE = 1;
    public static final int TASK_PAUSE = 2;
    public static final int TASK_RUNNING = 3;


    public static final int limit = 10;

    public static final String headImage = "headImage/";


    /**
     * 是否选定老师
     */
    public static final int teacher_un_collect = 1003;
    public static final int teacher_is_collect = 1004;
    public static final int teacher_un_select = 0;
    public static final int teacher_is_select = 1;


    /**
     * 退出标志位
     */
    public static final String isExit = "isExit";


    public static final int MSG_LOAD_OVER = 1;
    public static final int MSG_LOAD_ERROR = 2;
    public static final int MSG_LOAD_EMPTY = 3;
    public static final int MSG_LOAD_INIT = 4;
    public static final int MSG_LOAD_SUCCES = 5;
    public static final int UPDATE_UI = 0;
    public static final int UPDATE_A = 0;
    public static final int UPDATE_B = 1;
    public static final int MSG_NO_DATA = 1001;





    /**
     * 下拉刷新控件时间格式
     */
    public static final String FORMART_REFRESH_TIME = "yyyy-MM-dd HH:mm";

    /**
     * 设置下拉刷新的时间
     *
     * @param pull_refresh_list 下拉刷新控件
     */
    public static void setPullFormartRefreshTime(PullToRefreshBase pull_refresh_list) {
        long currentTime = System.currentTimeMillis();
        pull_refresh_list.setLastUpdatedLabel(DateTimeHelper.formatDate(new Date(currentTime), Constant.FORMART_REFRESH_TIME));

    }

}
